<?php
class Kd_Web_Response{

    private $_content = '';

    public function setHeader($header){
        header($header);
        return $this;
    }

    public function redirect($url){
        header("location:$url");
        $this->end();
    }

    public function getContent(){
        return $this->_content;
    }
    public function setContent($value){
    	$this->_content = $value;
    	return $this;
    }

    public function write($content){
        $this->_content .= $content;
        return $this;
    }

    public function clear(){
        $this->_content = '';
        return $this;
    }

    public function flush(){
        echo $this->_content;
    }

    public function end(){
        exit;
    }
}